package collection;

import java.util.HashMap;
import java.util.Map;

public class MyHashMap {
    public static void main(String args[]){

        Map<String,Integer> mp=new HashMap<>();
        mp.put("abcde",1);
        mp.put("edea",5);
        mp.put("ascas",2);
        mp.put("sawaw",0);
        mp.remove("edea");
        //查找key
        System.out.println(mp.containsKey("abcde"));
        //查找value
        System.out.println(mp.containsValue(0));
        for(String key:mp.keySet()){
            System.out.println(key+" "+mp.get(key));
        }

        for(Integer value: mp.values()){
            System.out.println(value);
        }

    }
}
